<%@ page contentType="text/html; charset=utf-8" pageEncoding="utf-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
	<head>
		<meta charset="utf-8">
		<title>新闻</title>
		
		<!-- CSS -->
		<link rel="stylesheet" href="${pageContext.request.contextPath}/css/style.css" type="text/css" media="screen" />
		<link rel="stylesheet" href="${pageContext.request.contextPath}/css/social-icons.css" type="text/css" media="screen" />
		<!--[if IE 8]>
		<link rel="stylesheet" type="text/css" media="screen" href="css/ie8-hacks.css" />
		<![endif]-->
		<!-- ENDS CSS -->

		<!-- GOOGLE FONTS
		<link href='http://fonts.googleapis.com/css?family=Ubuntu' rel='stylesheet' type='text/css'>-->

		<!-- JS -->
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-1.5.1.min.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery-ui-1.8.13.custom.min.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/easing.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.scrollTo-1.4.2-min.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.cycle.all.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/custom.js"></script>

		<!-- Isotope -->
		<script src="${pageContext.request.contextPath}/js/jquery.isotope.min.js"></script>

		<!--[if IE]>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/DD_belatedPNG.js"></script>
		<script>
		<![endif]-->

		<!-- Nivo slider -->
		<link rel="stylesheet" href="${pageContext.request.contextPath}/css/nivo-slider.css" type="text/css" media="screen" />
		<script src="${pageContext.request.contextPath}/js/nivo-slider/jquery.nivo.slider.js" type="text/javascript"></script>
		<!-- ENDS Nivo slider -->

		<!-- tabs -->
		<link rel="stylesheet" href="${pageContext.request.contextPath}/css/tabs.css" type="text/css" media="screen" />
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/tabs.js"></script>
		<!-- ENDS tabs -->

		<!-- prettyPhoto -->
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/prettyPhoto/js/jquery.prettyPhoto.js"></script>
		<link rel="stylesheet" href="${pageContext.request.contextPath}/js/prettyPhoto/css/prettyPhoto.css" type="text/css" media="screen" />
		<!-- ENDS prettyPhoto -->

		<!-- superfish -->
		<link rel="stylesheet" media="screen" href="${pageContext.request.contextPath}/css/superfish.css" />
		<link rel="stylesheet" media="screen" href="${pageContext.request.contextPath}/css/superfish-left.css" />
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/superfish-1.4.8/js/hoverIntent.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/superfish-1.4.8/js/superfish.js"></script>
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/superfish-1.4.8/js/supersubs.js"></script>
		<!-- ENDS superfish -->

		<!-- poshytip -->
		<link rel="stylesheet" href="${pageContext.request.contextPath}/js/poshytip-1.0/src/tip-twitter/tip-twitter.css" type="text/css" />
		<link rel="stylesheet" href="${pageContext.request.contextPath}/js/poshytip-1.0/src/tip-yellowsimple/tip-yellowsimple.css" type="text/css" />
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/poshytip-1.0/src/jquery.poshytip.min.js"></script>
		<!-- ENDS poshytip -->

		<!-- Tweet -->
		<link rel="stylesheet" href="${pageContext.request.contextPath}/css/jquery.tweet.css" media="all"  type="text/css"/>
		<script src="${pageContext.request.contextPath}/js/tweet/jquery.tweet.js" type="text/javascript"></script>
		<!-- ENDS Tweet -->

		<!-- Fancybox -->
		<link rel="stylesheet" href="${pageContext.request.contextPath}/js/jquery.fancybox-1.3.4/fancybox/jquery.fancybox-1.3.4.css" type="text/css" media="screen" />
		<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.fancybox-1.3.4/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
		<!-- ENDS Fancybox -->


	</head>
	
	<body>

			<!-- HEADER -->
			<div id="header">
				<!-- wrapper-header -->
				<div class="wrapper">
					<a href="${pageContext.request.contextPath}/news/index"><img id="logo" src="${pageContext.request.contextPath}/img/logo.png" alt="Nova" /></a>
					<!-- search -->
					<%--<div class="top-search">
						<form  method="get" id="searchform" action="#">
							<div>
								<input type="text" value="Search..." name="s" id="s" onfocus="defaultInput(this)" onblur="clearInput(this)" />
								<input type="submit" id="searchsubmit" value=" " />
							</div>
						</form>
					</div>--%>
					<!-- ENDS search -->
				</div>
				<!-- ENDS wrapper-header -->					
			</div>
			<!-- ENDS HEADER -->
			
			
			<!-- Menu -->
			<div id="menu">



				<!-- ENDS menu-holder -->
				<div id="menu-holder">
					<!-- wrapper-menu -->
					<div class="wrapper">
						<!-- Navigation -->
						<ul id="nav" class="sf-menu">
							<li class="current-menu-item"><a href="${pageContext.request.contextPath}/news/index">Home<span class="subheader">Welcome</span></a></li>
							<li><a href="${pageContext.request.contextPath}/news/category/1/10?id=2">society<span class="subheader">society news</span></a></li>
							<li><a href="${pageContext.request.contextPath}/news/category/1/10?id=3">internation <span class="subheader">information news</span></a></li>
							<li><a href="${pageContext.request.contextPath}/user/queryId">message<span class="subheader">message</span></a>
							</li>
						</ul>
						<!-- Navigation -->
					</div>
					<!-- wrapper-menu -->
				</div>
				<!-- ENDS menu-holder -->
			</div>
			
			
			

			
			<!-- MAIN -->
			<div id="main">
				<!-- wrapper-main -->
				<div class="wrapper">
					
					
					<!-- content -->
					<div id="content">
						
					<!-- title -->
					<div id="page-title">
						<c:if test="${news.get(0).categoryId=='2'}">
						<span class="title">聚焦社会</span>
						</c:if>
						<c:if test="${news.get(0).categoryId=='3'}">
							<span class="title">国际新闻</span>
						</c:if>
					</div>
					<!-- ENDS title -->

					<!-- page-content -->
						<div id="page-content">
						<c:forEach items="${news}" var="news">
						<div class="one-half">
							<h6 class="line-divider">${news.title} </h6>
							<a href="${pageContext.request.contextPath}/record/insert?link=${news.id}" class="thumb" title="An image"><img src="${news.photo}" alt="Post" /></a>
						</div>
						</c:forEach>
							<div class="one-half">
								<tr>
									<td colspan="7">共${pageCount}页
										&hearts; 当前为第${pageNum}页&hearts;
										<c:if test="${pageNum == 1}">
											首页
										</c:if>
										<c:if test="${pageNum != 1}">
											<a href="${pageContext.request.contextPath}/news/category/1/10?id=${news.get(0).categoryId}"/>首页</a>
										</c:if>&hearts;
										<c:if test="${pageNum == 1}">
											上一页
										</c:if> <c:if test="${pageNum != 1}">
											<a
													href="${pageContext.request.contextPath}/news/category/${pageNum-1}/10?id=${news.get(0).categoryId}">上一页</a>
										</c:if>&hearts;
										<c:if test="${pageNum==1 && pageNum != pageCount}">
											<a href="${pageContext.request.contextPath}/news/category/${pageNum}/10?id=${news.get(0).categoryId}">${pageNum}</a>
											<a href="${pageContext.request.contextPath}/news/category/${pageNum+1}/10?id=${news.get(0).categoryId}">${pageNum+1}</a>
											<a href="${pageContext.request.contextPath}/news/category/${pageNum+2}/10?id=${news.get(0).categoryId}">${pageNum+2}</a>
										</c:if>
										<c:if test="${pageNum!=1 && pageNum != pageCount}">
											<a href="${pageContext.request.contextPath}/news/category/${pageNum-1}/10?id=${news.get(0).categoryId}">${pageNum-1}</a>
											<a href="${pageContext.request.contextPath}/news/category/${pageNum}/10?id=${news.get(0).categoryId}">${pageNum}</a>
											<a href="${pageContext.request.contextPath}/news/category/${pageNum+1}/10?id=${news.get(0).categoryId}">${pageNum+1}</a>

										</c:if>

										<c:if test="${pageNum!=1 && pageNum == pageCount}">
											<a href="${pageContext.request.contextPath}/news/category/${pageNum-2}/10?id=${news.get(0).categoryId}">${pageNum-2}</a>
											<a href="${pageContext.request.contextPath}/news/category/${pageNum-1}/10?id=${news.get(0).categoryId}">${pageNum-1}</a>
											<a href="${pageContext.request.contextPath}/news/category/${pageNum}/10?id=${news.get(0).categoryId}">${pageNum}</a>

										</c:if> &hearts;
										<c:if test="${pageNum == pageCount}">
											下一页
										</c:if>
										<c:if test="${pageNum != pageCount}">
											<a href="${pageContext.request.contextPath}/news/category/${pageNum+1}/10?id=${news.get(0).categoryId}">下一页</a>
										</c:if>&hearts;
										<c:if test="${pageNum == pageCount}">
											尾页
										</c:if>
										<c:if test="${pageNum != pageCount}">
											<a href="${pageContext.request.contextPath}/news/category/${pageCount}/10?id=${news.get(0).categoryId}">尾页</a>
										</c:if>
									</td>
								</tr>
							</div>

						<!-- 2 cols -->
						<%--<div class="one-half">
							<h6 class="line-divider">One half </h6>
							<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugamet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vit, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus.</p>
						</div>
						<div class="one-half last">
							<h6 class="line-divider">One half</h6>
							<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugamet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vit, commodo vitae, ornare sit amet, wisi. Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus.</p>
						</div>
						<div class="clear "></div>
						<!-- ENDS 2 cols -->
						
						<!-- 3 cols -->
						<div class="one-third">
							<h6 class="line-divider">One third </h6>
							<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus.</p>
						</div>
						<div class="one-third">
							<h6 class="line-divider">One third </h6>
							<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus.</p>
						</div>
						<div class="one-third last">
							<h6 class="line-divider">One third </h6>
							<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus.</p>
						</div>
						<div class="clear "></div>
						<!-- ENDS 3 cols -->
						
						<!-- 4 cols -->
						<div class="one-fourth">
							<h6 class="line-divider">One fourth </h6>
							<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugamet, ante. Donec eu libero sit amet quam  semper.</p>
						</div>
						<div class="one-fourth">
							<h6 class="line-divider">One fourth </h6>
							<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugamet, ante. Donec eu libero sit amet quam  semper.</p>
						</div>
						<div class="one-fourth">
							<h6 class="line-divider">One fourth </h6>
							<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugamet, ante. Donec eu libero sit amet quam  semper.</p>
						</div>
						<div class="one-fourth last">
							<h6 class="line-divider">One fourth</h6>
							<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugamet, ante. Donec eu libero sit amet quam  semper.</p>
						</div>
						<div class="clear "></div>
						<!-- ENDS 4 cols -->
						
						<!-- 2/3 cols -->
						<div class="one-third">
							<h6 class="line-divider">One third </h6>
							<p>Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus.</p>
						</div>
						<div class="two-third last">
							<h6 class="line-divider">Two thirds</h6>
							<p>Pellentesque vit habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat Aenean fermentum, it sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. vit Aenean fermentum, Aenean fermentum, Aenean fermentum, Aenean fermentum, elit eget tincidunt condimentum, eros ipsum rutrum orci, sagittis tempus.</p>
						</div>
						<div class="clear "></div>
						<!-- ENDS 2/3 cols -->
						
						<!-- 1/4 cols -->
						
						<div class="three-fourth ">
							<h6 class="line-divider">Three fourths</h6>
							<p>Pellentesque vit habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat Aenean fermentum, it sapien ullamcorper pharetra. Vestibulum erat wisi, condimentum sed, commodo vitae, ornare sit amet, wisi. vit Aenean fermentum, Aenean fermentum, Aenean fermentum, Aenean fermentum, elit eget tincidunt condimentum,  sagittis tempus.</p>
						</div>
						<div class="one-fourth last">
							<h6 class="line-divider">One fourth </h6>
							<p>Pellentesque habitant morbi tristique et malesuada fames ac turpis egestas. Vestibulum tortorsagittis tempus.</p>
						</div>
						<div class="clear "></div>
						<!-- ENDS 1/4 cols -->--%>
	
					</div>
					<!-- ENDS page-content -->
		
					</div>
					<!-- ENDS content -->
				</div>
				<!-- ENDS wrapper-main -->
			</div>
			<!-- ENDS MAIN -->
			
			<!-- Twitter -->
			<%--<div id="twitter">
				<div class="wrapper">
					<a href="#" id="prev-tweet"></a>
					<a href="#" id="next-tweet"></a>
					<img id="bird" src="img/bird.png" alt="Tweets" />
					<div id="tweets">
						<ul class="tweet_list"></ul>
					</div>
				</div>
			</div>--%>
			<!-- ENDS Twitter -->

			<!-- FOOTER -->
			<div id="footer">
				<!-- wrapper-footer -->
				<div class="wrapper">
					<!-- footer-cols -->
					<ul id="footer-cols">
						<li class="col">
							<h6>页面</h6>
							<ul>
								<li class="page_item"><a href="${pageContext.request.contextPath}/news/index">Home</a></li>
								<li class="page_item"><a href="${pageContext.request.contextPath}/news/category/1/10?id=2">society</a></li>
								<li class="page_item"><a href="${pageContext.request.contextPath}/news/category/1/10?id=3">internation</a></li>
								<li class="page_item"><a href="${pageContext.request.contextPath}/user//queryId">message</a></li>
							</ul>
						</li>

						<li class="col">
							<h6>类别</h6>
							<ul>
								<li><a href="${pageContext.request.contextPath}/news/category/1/10?id=2">社会</a></li>
								<li><a href="${pageContext.request.contextPath}/news/category/1/10?id=3">国际</a></li>
								<li><a href="${pageContext.request.contextPath}/user//queryId">个人信息</a></li>

							</ul>
						</li>
						<li class="col">
							<h6>关于这个系统</h6>
							新闻推荐系统。
						</li>

					</ul>
					<!-- ENDS footer-cols -->
				</div>
				<!-- ENDS wrapper-footer -->
			</div>
			<!-- ENDS FOOTER -->


			<!-- Bottom -->
			<div id="bottom">
				<!-- wrapper-bottom -->
				<div class="wrapper">
					<div id="bottom-text">2018. <a href="http://www.cssmoban.com/">张振</a> </div>
					<!-- Social -->

					<!-- ENDS Social -->
					<div id="to-top" class="poshytip" title="To top"></div>
				</div>
				<!-- ENDS wrapper-bottom -->
			</div>
			<!-- ENDS Bottom -->
	</body>
</html>